import Vue from 'vue';
import Vuex from 'vuex';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from './router'
import Layout from './components/Layout.vue';

import VueCookies from 'vue-cookies'
import axios from 'axios'
import JwChat from 'jwchat';
import VueTypedJs from 'vue-typed-js'

Vue.use(Vuex)
Vue.use(ElementUI);
Vue.use(JwChat)
Vue.use(VueTypedJs)


//挂载axios和vuecookie到对象上
Vue.prototype.$axios = axios;
Vue.use(VueCookies)



//定义全局变量获取token
var store = new Vuex.Store({
  state: {
    isLogin: false,
	username: "",
	isOpenConsole: false, // 是否打开了控制台
	isclickDrawer: false, // 是否打开控制台菜单
  }
})


new Vue({
  el: '#app',
  router,
  store, //挂载一下前面定义的store
  render: h => h(Layout)
});
